<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/26
 * Time: 16:01
 */
global $_W,$_GPC;
if($_W['isajax']){
    $name = $_GPC['name'];
    $tel = $_GPC['tel'];
    $lottory_user = pdo_fetchall("SELECT `user_id` FROM ".tablename($this->lottory_user_table)." WHERE nick_name=:nickname",array(':nickname'=>$name));
    if(empty($lottory_user)){
        $qd_user = pdo_fetchall("select a.id from ims_meepo_xianchang_user a where  a.nick_name=:nickname",array(':nickname'=>$name));
        if(empty($qd_user)){
            die(json_encode(error(-1,'查无此人')));
        }else{
            foreach($qd_user as $row){
                $real_user[] = $row['id'];
            }

            die(json_encode(error(1,implode(",", $real_user))));
        }
    }else{
        foreach($lottory_user as $row){
            $real_user[] = $row['user_id'];
        }

        die(json_encode(error(0,implode(",", $real_user))));
    }
}